<?php #Хлебные крошки
class crumbs extends Load_use
{
	function getBlock()
	{
		$html = '';
		$links = $this->view->getCrumbs();

		if( $count_links = count( $links ) )
		{
			$html .= '<ul class="bread-crumbs">';
			foreach( $links as $i => $l )
			{
				$html .= '
					<li itemscope'.( $count_links == ( $i + 1 ) ? ' class="selected"' : '' ).' itemtype="http://data-vocabulary.org/Breadcrumb">
						<a href="'.$l['link'].'" itemprop="url">
							<span itemprop="title">
								'.$l['title'].'
							</span>
						</a>
					</li>';
			}
			$html .= '</ul>';
		}
		return $html;
	}
}